package org.dam.config;

import lombok.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.sqlite.SQLiteDataSource;

import javax.sql.DataSource;

/**
 * @Author dam
 * @create 2024/2/27 11:17
 */
@Configuration
public class SqliteConfig {

    private String url = "./sqlite/increment-backup.db";

    @Bean
    public DataSource dataSource() {
        SQLiteDataSource dataSource = new SQLiteDataSource();
        dataSource.setUrl("jdbc:sqlite:" + url);
        return dataSource;
    }
}